<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags"  prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'sys_user_show.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" type="text/css"
			href="./styles/control_panel.css" />
	<script type="text/javascript">
		function callBack(){
			window.history.back();
		}
	</script>
	<jsp:include page="../../rapid-validation.jsp"></jsp:include>
	<script type="text/javascript" src="./javaScripts/calendar.js"></script>
  </head>
  
  <body>
    <div style="margin-bottom: 4px; margin-left: 12px;" align="center">
		<div
			style="border: 1px solid #cccccc; height: auto !important; height: 100px; min-height: 100px;">
			<div class="control_con_right_0021">
				<table width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td align="left" class="tb_left" valign="middle" colspan="3"
							style="padding-left: 10px;">
							修改用户信息
						</td>
					</tr>
				</table>
			</div>
		<form action="bbs/user/user_updateUser.action" method="post" id="form1" name="form1" >
    	<table>
    		<tr height="30px">
    			<td width="100">用户名称：<input type="hidden"  name="userDTO.id" value="<s:property value="%{userDTO.id}"/>" class="required"/> <font color="red">*</font> 
    				<input type="hidden"  name="userDTO.password" value="<s:property value="%{userDTO.password}"/>"/>
    				<input type="hidden"  name="userDTO.registerTime" value="<s:property value="%{userDTO.registerTime}"/>"/>
    				<input type="hidden"  name="userDTO.onlineStatue" value="<s:property value="%{userDTO.onlineStatue}"/>"/>
    				<input type="hidden"  name="userDTO.photo" value="<s:property value="%{userDTO.photo}"/>"/>
    				<input type="hidden"  name="userDTO.registerAddr" value="<s:property value="%{userDTO.registerAddr}"/>"/>
    			</td>
    			<td width="150"><input type="text"  name="userDTO.userName" value="<s:property value="%{userDTO.userName}"/>"/>  </td>
    			<td width="100">邮箱：</td>
    			<td width="100"><input type="text"  name="userDTO.email" value="<s:property value="%{userDTO.email}"/>"class="required validate-email"/><font color="red">*</font></td>
    		</tr>
    		<tr height="30px">
    			<td width="100">出生年月日： </td>
    			<td width="150"><input type="text"  name="userDTO.brithday" onclick="calendar.show(this);" value="<s:date name="userDTO.brithday" format="yyyy-MM-dd"/>"/>  </td>
    			<td width="100">职业：</td>
    			<td width="100"><input type="text"  name="userDTO.career" value="<s:property value="%{userDTO.career}"/>"/></td>
    		</tr>
    		<tr height="30px">
    			<td width="100">省份：</td>
    			<td width="150"><input type="text"  name="userDTO.province" value="<s:property value="%{userDTO.province}"/>"/> </td>
    			<td width="100">城市：</td>
    			<td width="100"><input type="text"  name="userDTO.city" value="<s:property value="%{userDTO.city}"/>"/></td>
    		</tr>
    		<tr height="30px">
    			<td width="100">公司：</td>
    			<td width="150"><input type="text"  name="userDTO.company" value="<s:property value="%{userDTO.company}"/>"/> </td>
    			<td width="100">简历：</td>
    			<td width="100"><input type="text"  name="userDTO.resume" value="<s:property value="%{userDTO.resume}"/>"/></td>
    		</tr>
    		<tr height="30px">
    			<td width="100">MSN：</td>
    			<td width="150"><input type="text"  name="userDTO.msn" value="<s:property value="%{userDTO.msn}"/>"/> </td>
    			<td width="100">QQ：</td>
    			<td width="100"><input type="text"  name="userDTO.qq" value="<s:property value="%{userDTO.qq}"/>" class="validate-qq"/></td>
    		</tr>
    		<tr height="30px">
    			<td width="100">等级：</td>
    			<td width="150"><input type="text"  name="userDTO.level" value="<s:property value="%{userDTO.level}"/>"class="required validate-digits"/><font color="red">*</font> </td>
    			<td width="100" > 账户情况：</td>
    			<td width="100">
    				<s:select list="#{' ':'请选择','SOA':'有效','SOX':'无效'}" value="%{userDTO.userStatue}" name="userDTO.userStatue" theme="simple" cssClass="validate-selection"><font color="red">*</font></s:select>
    			</td>
    		</tr>
    		<tr height="30px">
    			<td  width="112">用户所属角色：</td>
    			<td colspan="3" align="left">
    				<s:if test="userDTO.id==15">
    					<select name="userDTO.roleId" disabled="disabled">
    					<s:iterator value="roleList" status="li" var="role1">
    						<s:if test="#userDTO.roleId==#role1.id"><option value="${role1.id}" selected="selected"> ${role1.role} </option> </s:if>
    						<s:else>
    							<option value="${role1.id}"> ${role1.role} </option>
    						</s:else>
    					</s:iterator>
    				</select>
    				</s:if>
    				<s:else>
					<select name="userDTO.roleId" class="validate-selection">
    					<s:iterator value="roleList" status="li" var="role1">
    						<s:if test="#userDTO.roleId==#role1.id"><option value="${role1.id}" selected="selected"> ${role1.role} </option> </s:if>
    						<s:elseif test="#role1.id==1"></s:elseif>
    						<s:else>
    							<option value="${role1.id}"> ${role1.role} </option>
    						</s:else>
    					</s:iterator>
    				</select><font color="red">*</font>
    				</s:else>
				</td>
    		</tr>
    		<tr height="50px">
    			<td colspan="4" align="center">
    				<input type="submit" value="提交"/> &nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="返回" onclick="callBack();"/>
    			</td>
    		</tr>
    	</table>
    	</form>
    </div>
    </div>
     <script>
new Validation('form1', {
	immediate : true
});
</script>
  </body>
</html>
